package com.codingInn.web.translater;

import org.springframework.stereotype.Component;
import org.springframework.web.servlet.RequestToViewNameTranslator;

import javax.servlet.http.HttpServletRequest;

@Component
public class MaiDiguaRequestToViewNameTranslator implements RequestToViewNameTranslator {
	@Override
	public String getViewName(HttpServletRequest request) throws Exception {
		if(request.getRequestURI().toString().endsWith("/tudou") && request.getMethod().equalsIgnoreCase("GET")){
			return "404";
		}
		else{
			return "maidigua";
		}
	}
}
